


var myApp=angular.module('myApp',["ui.router","lifeStyleOneModule","subTeJiModule","myHuaitiModule","myHuaitiSecondModule","loginModule","registModule","myTiYanModule","duJiaModule","mytiyanSecond","gerenModule"]);





myApp.config(function($stateProvider,$urlRouterProvider){	
	
//	实例
	$stateProvider.state("lifeStyleOne",{
        url:"/lifeStyleOne",
        templateUrl:"views/lifeStyleOne.html",
        controller:"lifeStyleOneController"
	}).state("myhome",{
        url:"/myhome",
        templateUrl:"views/myhome.html",
        controller:"myController"
	}).state("subLifeStyle1",{
        url:"/subLifeStyle1",
        templateUrl:"views/subLifeStyle1.html",
        controller:"subLifeStyleController1",
        params:{productId:null}
    }).state("huati",{
        url:"/huati",
        templateUrl:"views/huati.html",
        controller:"huatiController"
//      params:{productid:null}
    }).state("wode",{
        url:"/wode",
        templateUrl:"views/wode.html",
        controller:"wodeController"
//      params:{productid:null}
    }).state("regist",{
        url:"/regist",
        templateUrl:"views/regist.html",
        controller:"registController"
//      params:{productid:null}
    }).state("gerenzhongxin",{
        url:"/gerenzhongxin",
        templateUrl:"views/gerenzhongxin.html",
        controller:"gerenzhongxinController"
//      params:{productid:null}
    }).state("index",{
        url:"/index",
        templateUrl:"/index.html"
//      params:{productid:null}
    }).state("huatiSecond",{
			url:"/huatiSecond",
		templateUrl:"views/huatiSecond.html",
		controller:"myHuaitiSecondController",
		params:{huatiid:null}
	}).state("tiyan",{
        url:"/tiyan",
        templateUrl:"views/tiyan.html",
        controller:"tiYanController"
    }).state("dujia",{
        url:"/dujia",
        templateUrl:"views/dujia.html",
        controller:"duJiaController"
    }).state("fanTiYan",{
        url:"/fanTiYan",
        templateUrl:"views/tiYan.html"
    }).state("tiyanSecond",{
        url:"/tiyanSecond",
        templateUrl:"views/tiyanSecond.html",
        controller:"tiyanSecondGet"
    });

   
    $urlRouterProvider.otherwise("/index.html");
	
	
});



myApp.controller('myController', function ($scope,$state) {
// 页面加载后将首先执行主控制器“myController”，这里用 $state.go() 跳转到了“index”状态。
// 即当页面加载后首先看到的是“index”状态对应的模板内容。
    $state.go('myhome');



});


myApp.controller('testCtrl',function($scope){
	$scope.test='hello index'
});
